home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hackers Underworld 2: Forbidden Knowledge
/
Hackers Underworld 2: Forbidden Knowledge.iso
/
HACKING
/
PCFTP.T20
< prev
next >
Wrap
Text File
|
1994-07-17
|
1KB
|
46 lines
C PCFTP - TOPS-20 END OF PERSONAL COMPUTER FILE TRANSFER PROTOCOL
C DICK GILLMANN, JUNE 1982
DOUBLE PRECISION WAY,FNAME
INTEGER LINE(164)
OPEN(UNIT=5,MODE='IMAGE')
READ(5,1) FNAME
1 FORMAT(A10)
READ(5,2) WAY
2 FORMAT(A10)
IF(WAY.EQ.'UP ') GO TO 1000
C TOPS-20 TO PC
OPEN(UNIT=20,ACCESS='SEQIN',FILE=FNAME)
C MAIN LOOP
200 READ(20,4,ERR=300,END=300) LINE
4 FORMAT(132A1)
DO 250 I=1,132
N=133-I
IF(LINE(N).NE.' ') GOTO 275
250 CONTINUE
275 WRITE(5,5) (LINE(I),I=1,N)
5 FORMAT(1X,132A1)
GOTO 200
C DONE
300 WRITE(5,6)
6 FORMAT(1X,'!E!')
CLOSE(UNIT=20)
CALL EXIT
C PC TO TOPS-20
1000 OPEN(UNIT=20,ACCESS='SEQOUT',FILE=FNAME)
C MAIN LOOP
1100 READ(5,4) LINE
IF(LINE(1).EQ.'!'.AND.LINE(2).EQ.'E'.AND.LINE(3).EQ.'!')
& GOTO 1200
DO 1150 I=1,164
N=164-I
IF(LINE(N).NE.' ') GOTO 1175
1150 CONTINUE
1175 WRITE(20,4) (LINE(I),I=1,N)
GOTO 1100
C DONE
1200 CLOSE(UNIT=20)
CALL EXIT
END
Downloaded From P-80 International Information Systems 304-744-2253